import Vue from 'vue'
import VueRouter from 'vue-router'
const NCoVIndex = () => import('../pages/nCoV/index')
const NCoVList = () => import('../pages/nCoV/list')
const NCoVArticle = () => import('../pages/nCoV/article')

Vue.use(VueRouter)
/**
 * 路由管理
 */
const routes = [
  {
    path: '*',
    redirect: '/pages/nCoV/index'
  },
  {
    path: '/pages/nCoV/index',
    component: NCoVIndex,
    meta: {
      title: '新型冠状病毒疫情实况'
    }
  },
  {
    path: '/pages/nCoV/list',
    component: NCoVList,
    meta: {
      title: '文章列表'
    }
  },
  {
    path: '/pages/nCoV/article',
    component: NCoVArticle,
    meta: {
      title: '文章详情'
    }
  }
]

const router = new VueRouter({
  base: process.env.BASE_URL,
  routes
})

export default router